{inc:header}
<form action="admin.php" method="get">
	<div class="form-group">
		<input class="form-control" style="width:300px;float:left;margin-right:10px;" name="name" type="text" id="name" value="{$_GET['name']}" />
		<select class="form-control" name="status" id="status" style="width:100px;float:left;margin-right:10px;">
			<option value="">全部</option>
			<option value="0" <!-- IF[$_GET['status']=='0'] -->selected="selected"<!-- end -->>草稿</option>
			<option value="1" <!-- IF[$_GET['status']=='1'] -->selected="selected"<!-- end -->>发表</option>
			<option value="-1" <!-- IF[$_GET['status']=='-1'] -->selected="selected"<!-- end -->>隐藏</option>
		</select>
		<select class="form-control" name="cat" id="cat" style="width:100px;float:left;margin-right:10px;">
			<!-- $cats AS $key=> $v -->
			<option value="{$key}">{$v['name']}</option>
			<!-- end -->
		</select>
		<input type="hidden" name="action" value="cms" />
		<input type="hidden" name="ctrl" value="lists" />
		<input class="btn btn-default" name="submit" type="submit" id="submit" value="查询"/>
	</div>
</form>
<form action="admin.php" method="post" id="multctrl">
	<div class="form-group">
		<a class="btn btn-default" href="?action=cms&ctrl=add">+添加</a>
		<!-- IF[CREATHTML==1] --><a class="btn btn-default" href="?action=cms&ctrl=createhtml">生成文章静态</a><!-- end -->
		<a class="btn btn-default" href="?action=cms&ctrl=updateurl" onclick="return confirm('确认重置URL？本操作将根据设定的url规则重新生成url')">重置URL</a>
		<a class="btn btn-default" href="javascript:if(confirm('确认删除选中的文章？'))$track('multctrl').submit();">批量删除</a>
		<a class="btn btn-default" href="javascript:void(0);" onclick="$track('tocat').style.display='block';">批量移动</a>
		<select class="form-control hide" name="cat" id="tocat" onchange="$track('ctrl').value='tocat';$track('catid').value=this.value;$track('multctrl').submit()" >
			<!-- $cats AS $a --> 
			<option value="{$a['id']}" <!-- if($a['id']==$o['cat']) -->selected<!-- end --> >到{$a['name']}</option>
			<!-- END -->
		</select>
	</div>
	<table class="table table-bordered">
		<tr>
			<th width="20"><input type="checkbox" onclick="VerifyRadio();"/></th>
			<th width="60">ID</th>
			<th>标题</th>
			<th width="80">栏目</th>
			<th width="60">状态</th>
			<th width="60">评论</th>
			<th width="60">排序</th>
			<th width="140">操作</th>
		</tr>
		<!-- $list AS $atl -->
		<tr onmouseover="this.style.backgroundColor='#F4F4F4'" onmouseout="this.style.backgroundColor=''">
			<td><input name="id[]" type="checkbox" id="id[]" value="{$atl['id']}" /></td>
			<td>{$atl['id']}</td>
			<td><a title="点击编辑《{$atl['name']}》" href="?action=cms&id={$atl['id']}&ctrl=edit">{$atl['name']}</a></td>
			<td><a href="?action=cms&ctrl=lists&cat={$atl['cat']}">{$cats[$atl['cat']]['name']}</a></td>
			<td>{run:}echo Base::mystatus($atl['status']);{/run}</td>
			<td>{run:}echo Base::cmstatus($atl['allowcmt']);{/run}</td>
			<td>{$atl['orders']}</td>
			<td>
				<a href="../{$atl['staticurl']}" target="_blank">查看</a>&nbsp;&nbsp;&nbsp;
				<a href="?action=cms&id={$atl['id']}&ctrl=edit">编辑</a>&nbsp;&nbsp;&nbsp;
				<a href="?action=cms&id={$atl['id']}&ctrl=del" onclick="return confirm('确认删除《{$atl['name']}》')">删除</a>
				<!-- IF[CREATHTML==1] -->&nbsp;&nbsp;&nbsp;<a href="../index.php?createprocess=1&id={$atl['id']}&single=1">生成静态</a><!-- END-->
			</td>
		</tr>
		<!-- END -->
	</table>
	<input type="hidden" name="catid" id="catid" value="0" />
	<input type="hidden" name="action" value="cms" />
	<input type="hidden" name="ctrl" id="ctrl" value="del" />
</form>
<div class="text-center"> 
	<ul class="pagination">
		<li class="<!-- if(($page==0) || ($page==1)) -->disabled<!-- end -->"><a <!-- if(($page!=0) && ($page!=1)) -->href="?action=cms&ctrl=lists&p={$uppage}&cat={$_GET['cat']}&status={$_GET['status']}&name={$_GET['name']}"<!-- end --> >&laquo;</a></li>
		<!-- for($i=1;$i<$pagenum;$i++) -->
		<li id="page{$i}"><a href="?action=cms&ctrl=lists&p={$i}&cat={$_GET['cat']}&status={$_GET['status']}&name={$_GET['name']}">{$i}</a></li>
		<!-- end -->
		<li class="<!-- if($downpage==$page) -->disabled<!-- end -->"><a <!-- if($downpage!=$page) -->href="?action=cms&ctrl=lists&p={$downpage}&cat={$_GET['cat']}&status={$_GET['status']}&name={$_GET['name']}"<!-- end -->>&raquo;</a></li>
	</ul>
	<script>
		thispage = "{$_GET['p']}";
		if(thispage == "0" || thispage == "") {thispage = "1"}
		$(function(){
			$("#page"+thispage).addClass("active");
		});
	</script>
</div>
<!-- IF[$_i==0] -->
<div style="clear:both;">抱歉，没有文章数据，请先添加!</div>
<!-- END --> 
{inc:footer}